package com.gxkj.spark.alions.calculate

import org.apache.spark.SparkConf
import org.apache.spark.streaming.{Seconds, StreamingContext}

/**
  * 数据入口
  */
object Main {

  def main(args: Array[String]): Unit = {
//    val consumerId = "CID-bigdata";
//    val accessKey = "arzNQ1bmmyOSjHtt";
//    val secretKey = "yFHjBg4HXVwBSyMkTrxQWcuinAi2o7";
//    val topic = "bigdata";
//    val key = "*";
//
//     val conf = new SparkConf();
//     val ssc  = new StreamingContext(conf,Seconds(1))
//     val lines = ssc.receiverStream(new AliOnsReceiver(consumerId,accessKey,secretKey,topic,key));
//     lines.print()
//    println("receive msg : %s".format(lines))
//     ssc.start()
//     ssc.awaitTermination()
  }

}
